<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:faces="http://java.sun.com/jsf/composite/faces/components">
 
    <composite:interface >
    	<!-- Attributes for formItem -->
    	<composite:attribute name="id" type="java.lang.String"/>
	   	<composite:attribute name="value" type="java.lang.String"/>
	   	<composite:attribute name="styleClass" type="java.lang.String"/>
	   	<composite:attribute name="style" type="java.lang.String"/>
	   	<composite:attribute name="render" type="java.lang.String"/>
	   	<composite:attribute name="oncomplete" type="java.lang.String"/>
	   	<composite:attribute name="onsuccess" type="java.lang.String"/>
	   	<composite:attribute name="onclick" type="java.lang.String"/>
	   	<composite:attribute name="execute" type="java.lang.String" default="@form"/>
	   	<composite:attribute name="action" method-signature="void action()"/>
    </composite:interface>
 
    <composite:implementation >
    	<a4j:commandButton id="button" value="#{cc.attrs.value}" action="#{cc.attrs.action}" 
			render="#{cc.attrs.render}" styleClass="#{cc.attrs.styleClass}" execute="#{cc.attrs.execute}"
			onclick="#{cc.attrs.onclick};$(this).attr('disabled','disabled');" style="#{cc.attrs.style}"
			oncomplete="#{cc.attrs.oncomplete};$(event.source).removeAttr('disabled');if(#{faces.tools.success}){#{cc.attrs.onsuccess}}"/>
    </composite:implementation>
</ui:composition>